focusedFrame

abstract fun focusedFrame(): Optional<Frame>

Returns an Optional that contains the focused Frame on the currently loaded web page, otherwise an empty Optional.

Make sure that the web page is loaded completely before accessing its focused frame.

Throws

when the browser is already closed